<template>
  <div class="footer">
      <div class="header_logo">
        <img :src="info.file2" alt="" />
      </div>
      <div>
        {{$t('public.address')}}:{{info.address}}
      </div>
      <div>
        {{$t('public.Copyright')}}:{{info.copyright}}
      </div>

  </div>
</template>

<script>
  import {
      user_system
    } from '@/utils/wqzApi'
export default {
  components:{
  },
  data() {
    return{
      info:{
        address:"",
        copyright:'',
        file2:''
      }
    }
  },
  mounted() {
    this.getInfo()
  },
  methods:{
    getInfo(){
      var info = JSON.parse(localStorage.getItem('webInfo'))
      if(info== null){
        var lang =  localStorage.getItem("lang");
        var data = {
          lang:lang=='zh-CN'?1:2
        }
        user_system(data).then(res=>{
          localStorage.setItem('webInfo' , JSON.stringify(res.data))
          info = res.data
          if(lang=='zh-CN'){
            this.info = info[1]
          }else{
            this.info = info[0]
          }
        })
      }else{
        var lang =  localStorage.getItem("lang");
        if(lang=='zh-CN'){
          this.info = info[1]
        }else{
          this.info = info[0]
        }
      }

    }
  },

}
</script>

<style scoped lang="scss">
  .footer{
    width: 100%;
    height: 10vh;
    display: flex;
    align-items: center;
    padding: 0 10vw;
    box-sizing: border-box;
    justify-content: space-between;
    color: #333;
    font-size: .7vw;
    background-color: #e6e6e6;
  }
  .header_logo{
    width: 10vw;
    height: 10vh;
    display: flex;
    align-items: center;
    img{
      width: 5vw;
    }
  }

</style>
